package cn.tedu.eguser1.base;

import cn.tedu.eguser1.base.response.jsonresoulte;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@Slf4j
@RestControllerAdvice
public class expection {
@ExceptionHandler(RuntimeException.class)
    public jsonresoulte handleRuntimeException(RuntimeException e)
    {
        String data=e.getMessage();
        log.error("服务器异常:{}",e.getMessage());
        return jsonresoulte.faild(data);
    }
}
